package com.wl2o2o.lanqiao.xzfourteen;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
/** 
* @author : WLei224
* @date ：2023年3月17日 下午4:08:38 
* 
*/
public class 求解质因子 {
	static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
	public static void main(String[] args) throws Exception, IOException {
		long N = Long.parseLong(in.readLine());
		// 求出所有质因子
		for (long i = 2L; i*i <= N; i++) {
			if (N % i == 0) {
				System.out.print(i + " ");
				while (N % i == 0) {
					N /= i;
				}
			}
		}
		if(N>1) {
			System.out.println(N);
		}
	}
}

